package com.sdruixinggroup.mondayb2b.widget;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.sdruixinggroup.mondayb2b.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by 00029935 on 2018/1/20.
 */

public class BigPicDialog extends AbDialogFragment {
    @BindView(R.id.iv_pic)
    ImageView ivPic;

    @Override
    protected int getLayoutId() {
        return R.layout.big_pic_dialog_layout;
    }

    @Override
    protected void initData(View view) {
        ButterKnife.bind(this, view);
        ivPic.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        Glide.with(getActivity()).load(getTag()).into(ivPic);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }
}
